var tgd = tgd || {};
tgd.Utilities = tgd.Utilities || {};

tgd.Utilities.StringBuilder = function () {
	this._data = [];
	this._length = 0;

	if (tgd.Utilities.StringBuilder._initialized === undefined) {

		tgd.Utilities.StringBuilder.prototype.append = function(str) {
			this._data[this._length++] = str;
			return this;
		}

		tgd.Utilities.StringBuilder.prototype.repeat = function(str, cnt) {
			for (var i = 0; i < cnt; ++i, this._data[this._length++] = str);
			return this;
		}

		tgd.Utilities.StringBuilder.prototype.toString = function() {
			return this._data.join("");
		}

		tgd.Utilities.StringBuilder._initialized = true;
	}
}